package com.example.rabbitmqspringboot.listener;

import com.example.rabbitmqspringboot.constant.Constants;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class TopicListener1 {
    @RabbitListener(queues = Constants.TOPIC_QUEUE1)
    public void fanoutQueue1(String message) {
        System.out.println("队列[ " + Constants.TOPIC_QUEUE1 + " ], 接收到消息: " + message);
    }
}
